package process_demo.review.condition;

import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

/**
 * @author haomin
 * @date 2022/09/12 12:18
 **/
public class Demo {
    public static void main(String[] args) throws InterruptedException {
        Lock o = new ReentrantLock();
        Condition condition = o.newCondition();

        condition.await();
        condition.signal();
        condition.signalAll();

        o.lock();
        try {
            condition.await();
        }
        finally {

        }
        o.unlock();
    }
}